From: Jonas Dreßler Date: Fri, 2 Aug 2019 12:23:13 +0000 (+0200) Subject: appDisplay: Animate launch of new-window action in the AppIconMenu X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~839^2^2~18 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=73850fee0202867e684c0514f8a42d6512eb9079;p=gnome-shell.git appDisplay: Animate launch of new-window action in the AppIconMenu We add our own "New Window" menu entry if the app doesn't already provide a 'new-window' action. For this menu entry, we show the zoom out animation on the app icon when the user clicks the entry. To be consistent in case the app already provides its own 'new-window' action via its AppInfo, also show the zoom out animation when this action is activated. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/662 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f6bab8bbb..fc6c1290e 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -2060,6 +2060,10 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { let action = actions[i]; let item = this._appendMenuItem(appInfo.get_action_name(action)); item.connect('activate', (emitter, event) => { + if (action == 'new-window' && + this._source.app.state == Shell.AppState.STOPPED) + this._source.animateLaunch(); + this._source.app.launch_action(action, event.get_time(), -1); this.emit('activate-window', null); });